home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_13_1986_Transactor_Publishing.d64
/
address finder
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
930b
|
37 lines
20 print"this program will give the start"
30 print"and end address of a program"
50 input"what is the filename";f$
60 open2,8,2,f$+",p,r"
70 get#2,lo$: lo$=lo$+chr$(0)
80 get#2,hi$: hi$=hi$+chr$(0)
90 close2 :la=asc(lo$)+256*asc(hi$)
100 print"[147]working"
110 poke198,2:poke631,13:poke632,13:
115 oc=peek(646): rem save old chr colr
120 print"":poke646,peek(53281)and15
130 print"goto160":print""
140 print"verify";chr$(34);f$;chr$(34);",8,1[145][145][145][145][145]"
150 poke198,3:poke631,13:poke632,13:poke633,13:end
160 ea=peek(174)+256*peek(175)-1
170 poke 646,oc: rem restore char color
180 print""f$:print"[146]":print""
190 h$="0123456789abcdef"
200 x=la
210 fori=3to0step-1
220 n%=x/(16^i):x=x-n%*16^i
230 he$=he$+mid$(h$,n%+1,1)
240 next
250 p$="0123456789abcdef"
260 z=ea
270 fori=3to0step-1
280 n%=z/(16^i):z=z-n%*16^i
290 pe$=pe$+mid$(p$,n%+1,1)
300 next
310 print" start address :"la;"dec. ";he$;" hex"
320 print" end address :"ea;"dec. ";pe$;" hex"
330 clr
340 print"another file? y/n"
350 geta$:ifa$=""then350
360 if a$="y"then50
370 end